From: Joey Hess Date: Tue, 20 Sep 2022 16:56:16 +0000 (-0400) Subject: comment X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~69^2~94 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com///%22http:/www.example.com/cgi/%22https:/www.github.com/?a=commitdiff_plain;h=3adf1f24e252f2eb16c7c4a43f83480d89c02c3d;p=git-annex.git comment --- diff --git a/doc/bugs/Incorrect___34__file_content_has_changed__34___on_duplicates/comment_6_4d05a896fd57b55388fb21638ed02233._comment b/doc/bugs/Incorrect___34__file_content_has_changed__34___on_duplicates/comment_6_4d05a896fd57b55388fb21638ed02233._comment new file mode 100644 index 0000000000..848f170302 --- /dev/null +++ b/doc/bugs/Incorrect___34__file_content_has_changed__34___on_duplicates/comment_6_4d05a896fd57b55388fb21638ed02233._comment @@ -0,0 +1,24 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 6""" + date="2022-09-20T16:42:18Z" + content=""" +Ah, here's the smoking gun: In Remote.Helper.ExportImport, +it gets the cids for a key. And promptly picks the first one to pass to +retrieveExportWithContentIdentifier, ignoring all the rest. +It also gets the first recorded export location and likewise passes it to +retrieveExportWithContentIdentifier. + +It seems like a fix would be to try retrieveExportWithContentIdentifier +with each combination of cid and export location. But that would cause an +`O(N^2)` explosion and it's possible a remote has say 1000 empty files in +it. + +Maybe instead make retrieveExportWithContentIdentifier take a list of valid +cids, and accept any one of them? Then it would only need to be tried on +each export location in turn until one succeeds. + +(Hm, removeExportWithContentIdentifier and +checkPresentExportWithContentIdentifier already use a list, so similar problems +are avoided with them.) +"""]]